public class byte[][]
extends Object
GDK enhancements for byte[][].
| Methods inherited from class | Name |
|---|---|
class Object |
addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Flattens a 2D array into a new collection. The items are copied row by row.
Example usage:
byte[][] array = [[0, 1], [2, 3]]
assert array.flatten() == [0, 1, 2, 3]
A transpose method for 2D byte arrays.
Example usage:
byte[][] bytes = [[1, 10], [2, 20]]
byte[][] expected = [[1, 2], [10, 20]]
def result = bytes.transpose()
assert result == expected
assert bytes.class.componentType == result.class.componentType